#pragma once

typedef enum _command_type
{
    cmd_event = 0,
    cmd_response
}cmd_type;

typedef enum _event_type
{
    cmd_event_unknown = 0,
    cmd_event_conf_join,
    cmd_event_conf_leave,
    cmd_event_conf_state,
    cmd_event_newcallerid,
    cmd_event_newaccountcode,
    cmd_event_extensionstatus,
    cmd_event_newstate,
    cmd_event_newexten,
    cmd_event_varset,
    cmd_event_rtcpsent,
    cmd_event_hangup,
    cmd_event_newchannel
} event_type;

class ast_ami
{
public:
    ast_ami();
    ~ast_ami();
    ast_ami * parse(char * aCommand );
    ast_ami & operator=(const ast_ami & aOther );
    int operator==(const ast_ami & aOther );
    void   line_print_dbg(char *aFmts, ... );
    
    char   s_event[32];
    char   s_channel[32];
    char   s_flags[12];
    char   s_conferencename[32];
    int    i_count;
    int    i_key;
    int    i_mute;
    char   s_member[32];
    char   s_callerid[32];
    char   s_calleridname[32];
    char   s_state[32];
    char   s_uniqueid[32];
    int    i_duration;
    char   s_moderators[32];
    char   s_privilege[32];
    char   s_message[128];
    char   s_status[64];
    char   s_response[32];
};
